package com.sun.dto.users;



import com.sun.enums.EUserType;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * MP自动填充Handler
 *
 * @Author sun
 * @CreateTime 2025/9/6 19:23
 */
public record UserDto(Long id,
                      String name,
                      String code,
                      String description,
                      String remark,
                      boolean enabled,
                      String username,
                      String password,
                      String phone,
                      String openid,

                      EUserType type,

                      LocalDateTime createTime,
                      LocalDateTime updateTime,
                      String createrName,
                      String updaterName,
                      Long createrId,
                      Long updaterId, List<RoleDto> roles

) {
    public UserDto(Long id,
                   String name,
                   String code,
                   String description,
                   String remark,
                   boolean enabled,
                   String username,
                   String password,
                   String phone,
                   String openid,

                   EUserType type,

                   LocalDateTime createTime,
                   LocalDateTime updateTime,
                   String createrName,
                   String updaterName,
                   Long createrId,
                   Long updaterId) {
            this(id, name,
                    code, description,
                    remark, enabled, username,
                    password, phone, openid, type,
                    createTime, updateTime, createrName,
                    updaterName, createrId, updaterId, new ArrayList<>());
    }


}
